package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.PtTurntablePrizeEntity;
import com.dragon.modules.yuegou.enums.member.PtTurntablePrizePrizeType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 大转盘奖品 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-08-12 14:08:15
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class PtTurntablePrizeQuery extends PtTurntablePrizeEntity implements Query<PtTurntablePrizeEntity> {


    /** id查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 是否是中奖配置查询条件 */
	@JsonUnwrapped(prefix = "prizeFlag")
	private Condition<Boolean> prizeFlagCondition;

    /** 大转盘ID查询条件 */
	@JsonUnwrapped(prefix = "pointTurntableId")
	private Condition<String> pointTurntableIdCondition;

    /** [枚举]奖品类型：0-实物产品-G1、1-虚拟产品-G2查询条件 */
	@JsonUnwrapped(prefix = "prizeType")
	private Condition<PtTurntablePrizePrizeType> prizeTypeCondition;

    /** 奖品标题查询条件 */
	@JsonUnwrapped(prefix = "prizeTitle")
	private Condition<String> prizeTitleCondition;

    /** 商品id查询条件 */
	@JsonUnwrapped(prefix = "goodsId")
	private Condition<String> goodsIdCondition;

    /** 商品名称查询条件 */
	@JsonUnwrapped(prefix = "goodsName")
	private Condition<String> goodsNameCondition;

    /** 商品图案查询条件 */
	@JsonUnwrapped(prefix = "goodsImg")
	private Condition<String> goodsImgCondition;

    /** 是否无限大查询条件 */
	@JsonUnwrapped(prefix = "goodsInfinite")
	private Condition<Boolean> goodsInfiniteCondition;

    /** 奖品数量查询条件 */
	@JsonUnwrapped(prefix = "goodsCount")
	private Condition<Integer> goodsCountCondition;

    /** 中奖概率查询条件 */
	@JsonUnwrapped(prefix = "goodsProbability")
	private Condition<Integer> goodsProbabilityCondition;

    /** 商品序号查询条件 */
	@JsonUnwrapped(prefix = "goodsSort")
	private Condition<Integer> goodsSortCondition;

    /** 赠送积分数量查询条件 */
	@JsonUnwrapped(prefix = "pointCount")
	private Condition<Long> pointCountCondition;

    /** 删除标志，0未删除，1删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 删除人查询条件 */
	@JsonUnwrapped(prefix = "delBy")
	private Condition<String> delByCondition;

    /** 删除时间查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public PtTurntablePrizeQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public PtTurntablePrizeQuery(PtTurntablePrizeEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public PtTurntablePrizeQuery(PtTurntablePrizeQuery other) {
		super(other);
		if (other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if (other.prizeFlagCondition != null) {
			this.prizeFlagCondition = other.prizeFlagCondition.copy();
		}
		if (other.pointTurntableIdCondition != null) {
			this.pointTurntableIdCondition = other.pointTurntableIdCondition.copy();
		}
		if (other.prizeTypeCondition != null) {
			this.prizeTypeCondition = other.prizeTypeCondition.copy();
		}
		if (other.prizeTitleCondition != null) {
			this.prizeTitleCondition = other.prizeTitleCondition.copy();
		}
		if (other.goodsIdCondition != null) {
			this.goodsIdCondition = other.goodsIdCondition.copy();
		}
		if (other.goodsNameCondition != null) {
			this.goodsNameCondition = other.goodsNameCondition.copy();
		}
		if (other.goodsImgCondition != null) {
			this.goodsImgCondition = other.goodsImgCondition.copy();
		}
		if (other.goodsInfiniteCondition != null) {
			this.goodsInfiniteCondition = other.goodsInfiniteCondition.copy();
		}
		if (other.goodsCountCondition != null) {
			this.goodsCountCondition = other.goodsCountCondition.copy();
		}
		if (other.goodsProbabilityCondition != null) {
			this.goodsProbabilityCondition = other.goodsProbabilityCondition.copy();
		}
		if (other.goodsSortCondition != null) {
			this.goodsSortCondition = other.goodsSortCondition.copy();
		}
		if (other.pointCountCondition != null) {
			this.pointCountCondition = other.pointCountCondition.copy();
		}
		if (other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		this.setOther(other);
	}

	private void setOther(PtTurntablePrizeQuery other){
		if(other.delByCondition != null) {
			this.delByCondition = other.delByCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<PtTurntablePrizeEntity> toQueryWrapper() {
		QueryWrapper<PtTurntablePrizeEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (prizeFlagCondition != null) {
			prizeFlagCondition.toWrapper(wrapper, COL_PRIZE_FLAG);
		}
		if (pointTurntableIdCondition != null) {
			pointTurntableIdCondition.toWrapper(wrapper, COL_POINT_TURNTABLE_ID);
		}
		if (prizeTypeCondition != null) {
			prizeTypeCondition.toWrapper(wrapper, COL_PRIZE_TYPE);
		}
		if (prizeTitleCondition != null) {
			prizeTitleCondition.toWrapper(wrapper, COL_PRIZE_TITLE);
		}
		if (goodsIdCondition != null) {
			goodsIdCondition.toWrapper(wrapper, COL_GOODS_ID);
		}
		if (goodsNameCondition != null) {
			goodsNameCondition.toWrapper(wrapper, COL_GOODS_NAME);
		}
		if (goodsImgCondition != null) {
			goodsImgCondition.toWrapper(wrapper, COL_GOODS_IMG);
		}
		if (goodsInfiniteCondition != null) {
			goodsInfiniteCondition.toWrapper(wrapper, COL_GOODS_INFINITE);
		}
		if (goodsCountCondition != null) {
			goodsCountCondition.toWrapper(wrapper, COL_GOODS_COUNT);
		}
		if (goodsProbabilityCondition != null) {
			goodsProbabilityCondition.toWrapper(wrapper, COL_GOODS_PROBABILITY);
		}
		if (goodsSortCondition != null) {
			goodsSortCondition.toWrapper(wrapper, COL_GOODS_SORT);
		}
		if (pointCountCondition != null) {
			pointCountCondition.toWrapper(wrapper, COL_POINT_COUNT);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		return getQueryWrapper(wrapper);
	}

	private QueryWrapper<PtTurntablePrizeEntity> getQueryWrapper(QueryWrapper<PtTurntablePrizeEntity> wrapper){
		if (delByCondition != null) {
			delByCondition.toWrapper(wrapper, COL_DEL_BY);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回id查询条件
	 * 
	 * @return idCondition id查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取id查询条件
	 * 
	 * @return idCondition id查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置id查询条件
	 * 
	 * @param idCondition id查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回是否是中奖配置查询条件
	 * 
	 * @return prizeFlagCondition 是否是中奖配置查询条件
	 */
	public Condition<Boolean> prizeFlag() {
		this.prizeFlagCondition = new Condition<>();
		return this.prizeFlagCondition;
	}
	
	/**
	 * 获取是否是中奖配置查询条件
	 * 
	 * @return prizeFlagCondition 是否是中奖配置查询条件
	 */
	public Condition<Boolean> getPrizeFlagCondition() {
		return prizeFlagCondition;
	}

	/**
	 * 设置是否是中奖配置查询条件
	 * 
	 * @param prizeFlagCondition 是否是中奖配置查询条件
	 */
	public void setPrizeFlagCondition(Condition<Boolean> prizeFlagCondition) {
		this.prizeFlagCondition = prizeFlagCondition;
	}

	/**
	 * 构造并返回大转盘ID查询条件
	 * 
	 * @return pointTurntableIdCondition 大转盘ID查询条件
	 */
	public Condition<String> pointTurntableId() {
		this.pointTurntableIdCondition = new Condition<>();
		return this.pointTurntableIdCondition;
	}
	
	/**
	 * 获取大转盘ID查询条件
	 * 
	 * @return pointTurntableIdCondition 大转盘ID查询条件
	 */
	public Condition<String> getPointTurntableIdCondition() {
		return pointTurntableIdCondition;
	}

	/**
	 * 设置大转盘ID查询条件
	 * 
	 * @param pointTurntableIdCondition 大转盘ID查询条件
	 */
	public void setPointTurntableIdCondition(Condition<String> pointTurntableIdCondition) {
		this.pointTurntableIdCondition = pointTurntableIdCondition;
	}

	/**
	 * 构造并返回[枚举]奖品类型：0-实物产品-G1、1-虚拟产品-G2查询条件
	 * 
	 * @return prizeTypeCondition [枚举]奖品类型：0-实物产品-G1、1-虚拟产品-G2查询条件
	 */
	public Condition<PtTurntablePrizePrizeType> prizeType() {
		this.prizeTypeCondition = new Condition<>();
		return this.prizeTypeCondition;
	}
	
	/**
	 * 获取[枚举]奖品类型：0-实物产品-G1、1-虚拟产品-G2查询条件
	 * 
	 * @return prizeTypeCondition [枚举]奖品类型：0-实物产品-G1、1-虚拟产品-G2查询条件
	 */
	public Condition<PtTurntablePrizePrizeType> getPrizeTypeCondition() {
		return prizeTypeCondition;
	}

	/**
	 * 设置[枚举]奖品类型：0-实物产品-G1、1-虚拟产品-G2查询条件
	 * 
	 * @param prizeTypeCondition [枚举]奖品类型：0-实物产品-G1、1-虚拟产品-G2查询条件
	 */
	public void setPrizeTypeCondition(Condition<PtTurntablePrizePrizeType> prizeTypeCondition) {
		this.prizeTypeCondition = prizeTypeCondition;
	}

	/**
	 * 构造并返回奖品标题查询条件
	 * 
	 * @return prizeTitleCondition 奖品标题查询条件
	 */
	public Condition<String> prizeTitle() {
		this.prizeTitleCondition = new Condition<>();
		return this.prizeTitleCondition;
	}
	
	/**
	 * 获取奖品标题查询条件
	 * 
	 * @return prizeTitleCondition 奖品标题查询条件
	 */
	public Condition<String> getPrizeTitleCondition() {
		return prizeTitleCondition;
	}

	/**
	 * 设置奖品标题查询条件
	 * 
	 * @param prizeTitleCondition 奖品标题查询条件
	 */
	public void setPrizeTitleCondition(Condition<String> prizeTitleCondition) {
		this.prizeTitleCondition = prizeTitleCondition;
	}

	/**
	 * 构造并返回商品id查询条件
	 * 
	 * @return goodsIdCondition 商品id查询条件
	 */
	public Condition<String> goodsId() {
		this.goodsIdCondition = new Condition<>();
		return this.goodsIdCondition;
	}
	
	/**
	 * 获取商品id查询条件
	 * 
	 * @return goodsIdCondition 商品id查询条件
	 */
	public Condition<String> getGoodsIdCondition() {
		return goodsIdCondition;
	}

	/**
	 * 设置商品id查询条件
	 * 
	 * @param goodsIdCondition 商品id查询条件
	 */
	public void setGoodsIdCondition(Condition<String> goodsIdCondition) {
		this.goodsIdCondition = goodsIdCondition;
	}

	/**
	 * 构造并返回商品名称查询条件
	 * 
	 * @return goodsNameCondition 商品名称查询条件
	 */
	public Condition<String> goodsName() {
		this.goodsNameCondition = new Condition<>();
		return this.goodsNameCondition;
	}
	
	/**
	 * 获取商品名称查询条件
	 * 
	 * @return goodsNameCondition 商品名称查询条件
	 */
	public Condition<String> getGoodsNameCondition() {
		return goodsNameCondition;
	}

	/**
	 * 设置商品名称查询条件
	 * 
	 * @param goodsNameCondition 商品名称查询条件
	 */
	public void setGoodsNameCondition(Condition<String> goodsNameCondition) {
		this.goodsNameCondition = goodsNameCondition;
	}

	/**
	 * 构造并返回商品图案查询条件
	 * 
	 * @return goodsImgCondition 商品图案查询条件
	 */
	public Condition<String> goodsImg() {
		this.goodsImgCondition = new Condition<>();
		return this.goodsImgCondition;
	}
	
	/**
	 * 获取商品图案查询条件
	 * 
	 * @return goodsImgCondition 商品图案查询条件
	 */
	public Condition<String> getGoodsImgCondition() {
		return goodsImgCondition;
	}

	/**
	 * 设置商品图案查询条件
	 * 
	 * @param goodsImgCondition 商品图案查询条件
	 */
	public void setGoodsImgCondition(Condition<String> goodsImgCondition) {
		this.goodsImgCondition = goodsImgCondition;
	}

	/**
	 * 构造并返回是否无限大查询条件
	 * 
	 * @return goodsInfiniteCondition 是否无限大查询条件
	 */
	public Condition<Boolean> goodsInfinite() {
		this.goodsInfiniteCondition = new Condition<>();
		return this.goodsInfiniteCondition;
	}
	
	/**
	 * 获取是否无限大查询条件
	 * 
	 * @return goodsInfiniteCondition 是否无限大查询条件
	 */
	public Condition<Boolean> getGoodsInfiniteCondition() {
		return goodsInfiniteCondition;
	}

	/**
	 * 设置是否无限大查询条件
	 * 
	 * @param goodsInfiniteCondition 是否无限大查询条件
	 */
	public void setGoodsInfiniteCondition(Condition<Boolean> goodsInfiniteCondition) {
		this.goodsInfiniteCondition = goodsInfiniteCondition;
	}

	/**
	 * 构造并返回奖品数量查询条件
	 * 
	 * @return goodsCountCondition 奖品数量查询条件
	 */
	public Condition<Integer> goodsCount() {
		this.goodsCountCondition = new Condition<>();
		return this.goodsCountCondition;
	}
	
	/**
	 * 获取奖品数量查询条件
	 * 
	 * @return goodsCountCondition 奖品数量查询条件
	 */
	public Condition<Integer> getGoodsCountCondition() {
		return goodsCountCondition;
	}

	/**
	 * 设置奖品数量查询条件
	 * 
	 * @param goodsCountCondition 奖品数量查询条件
	 */
	public void setGoodsCountCondition(Condition<Integer> goodsCountCondition) {
		this.goodsCountCondition = goodsCountCondition;
	}

	/**
	 * 构造并返回中奖概率查询条件
	 * 
	 * @return goodsProbabilityCondition 中奖概率查询条件
	 */
	public Condition<Integer> goodsProbability() {
		this.goodsProbabilityCondition = new Condition<>();
		return this.goodsProbabilityCondition;
	}
	
	/**
	 * 获取中奖概率查询条件
	 * 
	 * @return goodsProbabilityCondition 中奖概率查询条件
	 */
	public Condition<Integer> getGoodsProbabilityCondition() {
		return goodsProbabilityCondition;
	}

	/**
	 * 设置中奖概率查询条件
	 * 
	 * @param goodsProbabilityCondition 中奖概率查询条件
	 */
	public void setGoodsProbabilityCondition(Condition<Integer> goodsProbabilityCondition) {
		this.goodsProbabilityCondition = goodsProbabilityCondition;
	}

	/**
	 * 构造并返回商品序号查询条件
	 * 
	 * @return goodsSortCondition 商品序号查询条件
	 */
	public Condition<Integer> goodsSort() {
		this.goodsSortCondition = new Condition<>();
		return this.goodsSortCondition;
	}
	
	/**
	 * 获取商品序号查询条件
	 * 
	 * @return goodsSortCondition 商品序号查询条件
	 */
	public Condition<Integer> getGoodsSortCondition() {
		return goodsSortCondition;
	}

	/**
	 * 设置商品序号查询条件
	 * 
	 * @param goodsSortCondition 商品序号查询条件
	 */
	public void setGoodsSortCondition(Condition<Integer> goodsSortCondition) {
		this.goodsSortCondition = goodsSortCondition;
	}

	/**
	 * 构造并返回赠送积分数量查询条件
	 * 
	 * @return pointCountCondition 赠送积分数量查询条件
	 */
	public Condition<Long> pointCount() {
		this.pointCountCondition = new Condition<>();
		return this.pointCountCondition;
	}
	
	/**
	 * 获取赠送积分数量查询条件
	 * 
	 * @return pointCountCondition 赠送积分数量查询条件
	 */
	public Condition<Long> getPointCountCondition() {
		return pointCountCondition;
	}

	/**
	 * 设置赠送积分数量查询条件
	 * 
	 * @param pointCountCondition 赠送积分数量查询条件
	 */
	public void setPointCountCondition(Condition<Long> pointCountCondition) {
		this.pointCountCondition = pointCountCondition;
	}

	/**
	 * 构造并返回删除标志，0未删除，1删除查询条件
	 * 
	 * @return delCondition 删除标志，0未删除，1删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取删除标志，0未删除，1删除查询条件
	 * 
	 * @return delCondition 删除标志，0未删除，1删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置删除标志，0未删除，1删除查询条件
	 * 
	 * @param delCondition 删除标志，0未删除，1删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回删除人查询条件
	 * 
	 * @return delByCondition 删除人查询条件
	 */
	public Condition<String> delBy() {
		this.delByCondition = new Condition<>();
		return this.delByCondition;
	}
	
	/**
	 * 获取删除人查询条件
	 * 
	 * @return delByCondition 删除人查询条件
	 */
	public Condition<String> getDelByCondition() {
		return delByCondition;
	}

	/**
	 * 设置删除人查询条件
	 * 
	 * @param delByCondition 删除人查询条件
	 */
	public void setDelByCondition(Condition<String> delByCondition) {
		this.delByCondition = delByCondition;
	}

	/**
	 * 构造并返回删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置删除时间查询条件
	 * 
	 * @param delTimeCondition 删除时间查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
